package cn.edu.scau.cmi.wujiaming.experiment5.consistent;

public class ConsistentLeaf extends ConsistentComponent {
	private String name;
	
	public ConsistentLeaf(String name) {
		this.name = name;
	}
	@Override
	public String getName() {
		return "文件" + name;
	}
	
	@Override
	public String doSomething(boolean display, String tab) {
		if (display)
			return tab + getName() + "\n";
		else 
			return tab + "对" + getName() + "进行查询杀毒\n";
	}
}